<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		 <button onclick="show();">比大小</button>
		<script>
			 function show(){
			            var num1=parseInt(prompt("请输入输入第1个数:"));
			            var num2=parseInt(prompt("请输入输入第2个数:"));
			            var num3=parseInt(prompt("请输入输入第3个数:"));
			            if(num1>num2){
			                var temp=num1;
			                num1=num2;
			                num2=temp; //交换
			            }
			            if(num2>num3){
			                var temp=num2;
			                num2=num3;
			                num3=temp; //交换
			            }
			            document.write("结果:"+num1+"<"+num2+"<"+num3);
			        }	
			</script>
	</body>
</html>
